Existing mass spectrometers have an ion source that produces ions that are processed by a mass analyzer and eventually detected by a detection system. During operation, the mass spectrometer performs analytical scans that generate data. To ensure that the mass spectrometer generates accurate and consistent data during operation, and optimizes signal-to-noise ratios, a gain of the detection system is often calibrated to an optimum value before performing the analytical scans. Even so, during operation of the mass spectrometer, the detection system ages and its gain changes, leading to inaccurate and inconsistent data. A conventional approach for addressing degradation of the detection system gain involves periodic, manual initiation of a gain determination and calibration of the detection system. Gain determination and calibration are traditionally carried out only during downtime, when the mass spectrometer is not engaged in normal operation. However, users do not always do this because, unfortunately, it can be more cost- and time-effective to allow the mass spectrometer to continuously run for long periods of times, such as several days, without periodically stopping the mass spectrometer to carry out the gain determination and calibration. Accordingly, although existing approaches to measuring and calibrating gain of the detection system in a mass spectrometer have been generally adequate for their intended purposes, they have not been entirely satisfactory in all respects.